//
//  ZJPAFNetTool.h
//  FittingTrip
//
//  Created by 赵建平 on 16/3/7.
//  Copyright © 2016年 赵建平. All rights reserved.
//

#import <Foundation/Foundation.h>

typedef void(^BlockOfSuccess) (id result);

typedef NS_ENUM(NSUInteger, ZJPResponseStyle) {
    ZJPJSON,
    ZJPXML,
    ZJPDATA,
};

typedef NS_ENUM(NSUInteger, ZJPRequestStyle) {
    ZJPRequestJSON,
    ZJPRequestString,
};

@interface ZJPAFNetTool : NSObject

+ (void)GETNetWithUrl:(NSString *)url
                 body:(id)body
             headFile:(NSDictionary *)header
             response:(ZJPResponseStyle)responseStyle
              success:(BlockOfSuccess)success
              failure:(void (^)(NSError *error))failure;

+ (void)POSTNetWithUrl:(NSString *)url
                  body:(id)body
             bodyStyle:(ZJPRequestStyle)bodyRequestStyle
             headFile:(NSDictionary *)header
             response:(ZJPResponseStyle)responseStyle
              success:(BlockOfSuccess)success
              failure:(void (^)(NSError *error))failure;

@end
